package com.ms.education.acl.controller;

import com.ms.education.R;
import com.ms.education.acl.service.RolePermissionService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

/**
 * <p>
 * 角色权限 前端控制器
 * </p>
 *
 * @author ms
 * @since 2023-02-18
 */
@RestController
@RequestMapping("/acl/role-permission")
public class RolePermissionController {

    @Autowired
    private RolePermissionService rolePermissionService;


    @ApiOperation("给角色分配权限")
    @PostMapping("doAssign")
    public R doAssign(Integer roleId, Integer[] permissionIds){
        System.out.println("==============="+Arrays.toString(permissionIds));
        //rolePermissionService.saveRolePermissionRelationShip(roleId,permissionIds);
        return R.ok();
    }

}
